package com.wangzhixuan.db.dao;

import com.wangzhixuan.db.bean.Customer;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * Customer data access
 *
 * @author victor
 */
@Repository
public interface CustomerDao {

  /**
   * Add customer
   *
   * @param customer
   * @return Integer new created customer Id
   */
  public int addCustomer(Customer customer);

  /**
   * update customer
   *
   * @param customer
   * @return
   */
  public int updateCustomer(Customer customer);

  /**
   * Get customer by openId
   *
   * @param openId
   * @return
   */
  public Customer getCustomerByOpenId(@Param("openId") String openId);

  /**
   * Get customer by id
   *
   * @param customerId
   * @return
   */
  public Customer getCustomerById(@Param("customerId") long customerId);



}
